package com.gitee.wsl.func.procedure

import com.gitee.wsl.func.consumer.BiConsumer


/**
 * A Procedure2 is used by forEachWith() methods and for MapIterate.forEachKeyValue(). In the forEachKeyValue()
 * case the procedure takes the key as the first argument, and the value as the second.  In the forEachWith() case
 * the procedure takes the element of the collection as the first argument, and the specified parameter as the
 * second argument.
 */
interface Procedure2<T1, T2> : BiConsumer<T1, T2> {

    fun value(argument1: T1, argument2: T2)

    override fun accept(a: T1, b: T2) {
        this.value(a, b)
    }
}